<%--
    Document   : index
    Created on : Oct 11, 2011, 12:01:14 AM
    Author     : XuanTuan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>VeriSign Authentication Services - The leading Provider of SSL.
            Products include SSL, SSL Certificates, Extended Validation
            (EV SSL), VeriSign Trust Seal, Malware Scan & Code Signing.</title>
        <link href="styles.css" rel="stylesheet" type="text/css" media="screen" />
        <link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />

        <%
                    String username = request.getParameter("username");
                    String email = request.getParameter("email");
                    String errorReg = (String) request.getAttribute("errorReg");
                    username = (username == null) ? "" : username;
                    email = (email == null) ? "" : email;
                    errorReg = (errorReg == null) ? "" : errorReg;
        %>

        <script type="text/javascript" src="lib/hexmd5.js"></script>
        <script type="text/javascript">

            function hashRePass(a){
                document.forms.register.rePass.value = hex_md5(a);
            }

            function hashPass(a){
                document.forms.register.password.value = hex_md5(a);
            }
        </script>

    </head>
    <body>
        <div id="content">
            <div class="header_text">
                <div id="logo" >
                    <img src="images/verisignLogo.gif"/>
                </div>
            </div>
            <div id="back">
                <!-- header begins -->
                <div id="header">
                    <%@ include file="header.jsp" %>
                </div><!-- header ends -->

                <!-- content begins -->
                <div id="main">
                    <div id="right">
                        <h1>Register</h1><br/>
                        <form name="register" action="RegisterControl" method="post">
                            <table cellspacing="5">
                                <tr>
                                    <td></td>
                                    <td><font size="4" color="red"> <%=errorReg%> </font></td>
                                </tr>
                                <tr>
                                    <td>Username:</td>
                                    <td><input type="text" name="username" value="<%=username%>"/></td>
                                </tr>
                                <tr>
                                    <td>Password:</td>
                                    <td>
                                        <input type="password" name="password1" onchange="hashPass(this.value)"/>
                                        <input type="hidden" name="password">
                                    </td>
                                </tr>
                                <tr>
                                    <td>Retype password:</td>
                                    <td>
                                        <input type="password" name="rePass1" onchange="hashRePass(this.value)"/>
                                        <input type="hidden" name="rePass">
                                    </td>
                                </tr>
                                <tr>
                                    <td>Email:</td>
                                    <td><input type="text" name="email" value="<%=email%>"/></td>
                                </tr>
                                <tr>
                                    <td>Sex:</td>
                                    <td>
                                        <input type="radio" name="sex" value="male" checked/> Male<br />
                                        <input type="radio" name="sex" value="female" /> Female
                                    </td>
                                </tr>
                            </table>
                                <input type="submit" value="Submit"/>
                        </form>
                    </div>

                    <div id="left">
                        <jsp:include page="leftPanel.jsp" flush="true"/>
                    </div>
                </div><!--content ends -->

                <!--footer begins -->
                <div id="footer">
                    <p>Copyright  2011.Design by Nguyen Xuan Tuan</p>
                </div>
                <div style="clear: both"></div>
            </div>

        </div>
        <!-- footer ends-->
    </body>
</html>

